//package com.icsss.test1;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.ResponseEntity;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.WebMvcPatternsRequestConditionWrapper;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
//
//
//@Configuration
//@EnableSwagger2           //开启swagger2
//public class SwaggerConfig {
//    //配置了swagger的Docket的bean实例
//    @Bean
//    public Docket restfulApi() {
//
//        return new Docket(DocumentationType.SWAGGER_2)
//                .apiInfo(apiInfo())
//                .groupName("RestfulApi")
//                //.genericModelSubstitutes(DeferredResult.class)
//                .genericModelSubstitutes(ResponseEntity.class)
//                .useDefaultResponseMessages(true)
//                .forCodeGeneration(false)
//                .pathMapping("/**") // base，最终调用接口后会和paths拼接在一起
//                .select()
//                //加了ApiOperation注解的类，才生成接口文档
//                //.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
//                //暴露接口地址的包路径（即此包下的类，才生成接口文档）
//                .apis(RequestHandlerSelectors.basePackage("com.icsss.test1.controller"))
////                .paths(doFilteringRules())//自定义的过滤规则
//                .build();
//    }
//
//    //配置swagger信息  apiinfo
//    private ApiInfo apiInfo(){
//        return new ApiInfoBuilder()
//                .title("可心的swagger文档")
//                .description("我想认真读一本书")
//                .version("v3.0")
//                .termsOfServiceUrl("https://blog.csdn.net/weixin_58993861?type=blog")
//                .contact(new Contact("程序员", "", ""))
//                .build();
//
//    }
//}